package com.minimalist.common.entity.lindi.vo.subsidyapplication;

import cn.hutool.core.date.DatePattern;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.minimalist.common.entity.lindi.vo.enterpriseaccount.LindiEnterpriseAccountVO;
import com.minimalist.common.entity.lindi.vo.subsidyapplicationfile.LindiSubsidyApplicationFileVO;
import com.minimalist.common.entity.lindi.vo.subsidyapplication.LindiSubsidyApplicationTownItemVO;
import com.minimalist.common.entity.lindi.vo.subsidyapplicationtownpayment.LindiSubsidyApplicationTownPaymentVO;
import com.minimalist.common.utils.Add;
import com.minimalist.common.utils.Update;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;

/**
 * @author 11987
 */

@Schema(name = "林地指标交易平台_补贴申请实体")
public class LindiSubsidyApplicationVO implements Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @NotNull(message = "补贴申请ID不能为空", groups = {Update.class})
    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "subsidyApplicationId", description = "补贴申请ID", type = "string")
    private Long subsidyApplicationId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "enterpriseAccountId", description = "企业账号ID", type = "string")
    private Long enterpriseAccountId;
    @Schema(name = "enterpriseAccount", description = "企业账号信息", type = "object")
    private LindiEnterpriseAccountVO enterpriseAccount;

    @NotBlank(message = "项目名称不能为空", groups = {Add.class, Update.class})
    @Schema(name = "projectName", description = "项目名称", type = "string")
    private String projectName;

    @NotBlank(message = "项目地址不能为空", groups = {Add.class, Update.class})
    @Schema(name = "projectAddress", description = "项目地址", type = "string")
    private String projectAddress;

    @NotBlank(message = "补贴申领面积不能为空", groups = {Add.class, Update.class})
    @Schema(name = "amount", description = "补贴申领面积(亩)", type = "string")
    private String amount;

    @Schema(name = "projectDescription", description = "项目简介", type = "string")
    private String projectDescription;

    @Schema(name = "acceptDate", description = "验收时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime acceptDate;

    @Schema(name = "subsidyStatus", description = "补贴状态", type = "string")
    private String subsidyStatus;

    @Schema(name = "subsidyApplicationFileList", description = "补贴申请附件列表", type = "object")
    private List<LindiSubsidyApplicationFileVO> subsidyApplicationFileList;

    @Schema(name = "subsidyApplicationTownPaymentList", description = "镇街支付明细列表", type = "object")
    private List<LindiSubsidyApplicationTownPaymentVO> subsidyApplicationTownPaymentList;

    @Schema(name = "subsidyApplicationTownItemList", description = "镇街明细列表", type = "object")
    private List<LindiSubsidyApplicationTownItemVO> subsidyApplicationTownItemList;

    @Schema(name = "remark", description = "备注", type = "string")
    private String remark;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "createId", description = "创建人ID", type = "string")
    private Long createId;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(name = "updateId", description = "更新人ID", type = "string")
    private Long updateId;

    @Schema(name = "createTime", description = "创建时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime createTime;

    @Schema(name = "updateTime", description = "更新时间", type = "string")
    @JsonFormat(pattern = DatePattern.NORM_DATETIME_PATTERN)
    private LocalDateTime updateTime;

    public LindiSubsidyApplicationVO(){
    }

    public Long getSubsidyApplicationId(){
        return subsidyApplicationId;
    }

    public void setSubsidyApplicationId(Long subsidyApplicationId){
        this.subsidyApplicationId = subsidyApplicationId;
    }

    public Long getEnterpriseAccountId(){
        return enterpriseAccountId;
    }

    public void setEnterpriseAccountId(Long enterpriseAccountId){
        this.enterpriseAccountId = enterpriseAccountId;
    }

    public LindiEnterpriseAccountVO getEnterpriseAccount(){
        return enterpriseAccount;
    }

    public void setEnterpriseAccount(LindiEnterpriseAccountVO enterpriseAccount){
        this.enterpriseAccount = enterpriseAccount;
    }

    public String getProjectName(){
        return projectName;
    }

    public void setProjectName(String projectName){
        this.projectName = projectName;
    }

    public String getProjectAddress(){
        return projectAddress;
    }

    public void setProjectAddress(String projectAddress){
        this.projectAddress = projectAddress;
    }

    public String getAmount(){
        return amount;
    }

    public void setAmount(String amount){
        this.amount = amount;
    }

    public String getProjectDescription(){
        return projectDescription;
    }

    public void setProjectDescription(String projectDescription){
        this.projectDescription = projectDescription;
    }

    public LocalDateTime getAcceptDate(){
        return acceptDate;
    }

    public void setAcceptDate(LocalDateTime acceptDate){
        this.acceptDate = acceptDate;
    }

    public String getSubsidyStatus(){
        return subsidyStatus;
    }

    public void setSubsidyStatus(String subsidyStatus){
        this.subsidyStatus = subsidyStatus;
    }

    public List<LindiSubsidyApplicationFileVO> getSubsidyApplicationFileList(){
        return subsidyApplicationFileList;
    }

    public void setSubsidyApplicationFileList(List<LindiSubsidyApplicationFileVO> subsidyApplicationFileList){
        this.subsidyApplicationFileList = subsidyApplicationFileList;
    }

    public List<LindiSubsidyApplicationTownPaymentVO> getSubsidyApplicationTownPaymentList(){
        return subsidyApplicationTownPaymentList;
    }

    public void setSubsidyApplicationTownPaymentList(List<LindiSubsidyApplicationTownPaymentVO> subsidyApplicationTownPaymentList){
        this.subsidyApplicationTownPaymentList = subsidyApplicationTownPaymentList;
    }

    public List<LindiSubsidyApplicationTownItemVO> getSubsidyApplicationTownItemList(){
        return subsidyApplicationTownItemList;
    }

    public void setSubsidyApplicationTownItemList(List<LindiSubsidyApplicationTownItemVO> subsidyApplicationTownItemList){
        this.subsidyApplicationTownItemList = subsidyApplicationTownItemList;
    }

    public String getRemark(){
        return remark;
    }

    public void setRemark(String remark){
        this.remark = remark;
    }

    public Long getCreateId(){
        return createId;
    }

    public void setCreateId(Long createId){
        this.createId = createId;
    }

    public Long getUpdateId(){
        return updateId;
    }

    public void setUpdateId(Long updateId){
        this.updateId = updateId;
    }

    public LocalDateTime getCreateTime(){
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime){
        this.createTime = createTime;
    }

    public LocalDateTime getUpdateTime(){
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime){
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o){
        if (this == o){
            return true;
        }
        if (o == null || getClass() != o.getClass()){
            return false;
        }
        LindiSubsidyApplicationVO that = (LindiSubsidyApplicationVO) o;
        return Objects.equals(subsidyApplicationId, that.subsidyApplicationId) && Objects.equals(enterpriseAccountId, that.enterpriseAccountId) && Objects.equals(enterpriseAccount, that.enterpriseAccount) && Objects.equals(projectName, that.projectName) && Objects.equals(projectAddress, that.projectAddress) && Objects.equals(amount, that.amount) && Objects.equals(projectDescription, that.projectDescription) && Objects.equals(acceptDate, that.acceptDate) && Objects.equals(subsidyStatus, that.subsidyStatus) && Objects.equals(subsidyApplicationFileList, that.subsidyApplicationFileList) && Objects.equals(subsidyApplicationTownPaymentList, that.subsidyApplicationTownPaymentList) && Objects.equals(subsidyApplicationTownItemList, that.subsidyApplicationTownItemList) && Objects.equals(remark, that.remark) && Objects.equals(createId, that.createId) && Objects.equals(updateId, that.updateId) && Objects.equals(createTime, that.createTime) && Objects.equals(updateTime, that.updateTime);
    }

    @Override
    public int hashCode(){
        return Objects.hash(subsidyApplicationId, enterpriseAccountId, enterpriseAccount, projectName, projectAddress, amount, projectDescription, acceptDate, subsidyStatus, subsidyApplicationFileList, subsidyApplicationTownPaymentList, subsidyApplicationTownItemList, remark, createId, updateId, createTime, updateTime);
    }
}
